package com.dony.order.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dony.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 订单对象 shopee_order
 *
 * @author dony
 * @date 2022-09-07
 */
@Data
@TableName("shopee_order")
public class Order {

    /**
     * 订单编号
     */
    @TableId
    private String orderSn;

    private Long shopId;
    private String shopName;
    private Long merchantId;
    private Long tenantId;

    private Date createTime;
    private Date updateTime;

    @Excel(name = "国家")
    private String region;

    @Excel(name = "货币")
    private String currency;

    @Excel(name = "总价")
    private Float totalAmount;

    @Excel(name = "订单状态")
    private String orderStatus;
//    UNPAID：订单未支付
//    READY_TO_SHIP：订单待发货
//    PROCESSED: 卖家已经操作发货
//    RETRY_SHIP：3pl揽收失败，需要重新重新发货
//    SHIPPED：3pl揽收成功
//    TO_CONFIRM_RECEIVE：等待买家确认签收
//    IN_CANCEL：买家提交取消申请待处理
//    CANCELLED：订单已取消
//    TO_RETURN：买家提交退货申请待处理
//    COMPLETED：订单已完成

    @Excel(name = "物流商")
    private String shippingCarrier;

    @Excel(name = "支付方式")
    private String paymentMethod;

    @Excel(name = "预估费率")
    private Float estimatedShippingFee;

    @Excel(name = "信息")
    private String messageToSeller;

    @Excel(name = "发货天数")
    private Integer daysToShip;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shipByDate;

    @Excel(name = "买家ID")
    private Long buyerUserId;

    @Excel(name = "买家用户名")
    private String buyerUsername;

    @Excel(name = "收货人")
    private String recipientName;

    @Excel(name = "收货电话")
    private String recipientPhone;

    @Excel(name = "镇")
    private String recipientTown;

    @Excel(name = "区域")
    private String recipientDistrict;

    @Excel(name = "城市")
    private String recipientCity;

    @Excel(name = "状态")
    private String recipientState;

    @Excel(name = "国家")
    private String recipientRegion;

    @Excel(name = "邮编")
    private String recipientZipcode;

    @Excel(name = "完整地址")
    private String recipientFullAddress;

    @Excel(name = "实际费率")
    private Float actualShippingFee;

    @Excel(name = "备注")
    private String note;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    @Excel(name = "取消理由")
    private String buyerCancelReason;

    @Excel(name = "取消者")
    private String cancelBy;

    @Excel(name = "取消原因")
    private String cancelReason;

    //是否货到付款
    private Boolean cod;

    //只适用于跨境订单。此值指示订单是否包含需要在海关申报的货物。
    private Boolean goodsToDeclare;

    //备注更新时间
    private Date noteUpdateTime;

    //拾取完成时间
    private Date pickupDoneTime;

    //商品信息
    private String itemList;

    //仓库备注
    private String sysNote;

    //本系统的状态 0 未开始，
    private Integer sysStatus;

    //是否加急
    private Boolean emergency;

    //订单人民币价格
    private String priceCn;

    //面单地址
    private String docUrl;

    //黑名单
    private Boolean black;

    //订单收入
    private Float income;

    //打包时间
    private Date operationTime;

    //操作记录
    @TableField(exist = false)
    private List<OperationRecord> records;


}
